<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Untitled Document</title>
        <script type="text/javascript" src="../js/jquery-1.4.2.min.js">
        </script>
        <script type="text/javascript">
            $(document).ready(function(){
                $("input.btnAddbyjson").click(function(){
                    $.ajax({
                        url: "/survey/rest/locate/location/test001",
                        type: "GET",
                        dataType: 'json',
                        success: function(result, status){
                            var obj = result;
                            alert(obj.x + '   ' + obj.y);
                        },
                        error: function(){
                            alert("add category failed!");
                        }
                    });
                });
                
                $("input.btn").click(function(){
                    $.getJSON('http://localhost:8088/survey/rest/locate/location/test001', function(json){
                        alert(json);
                    });
                });
            });
        </script>
    </head>
    <body>
        <input type="button" class="btnAddbyjson" value="onclick1" /><input type="button" class="btn" value="onclick2" />
    </body>
</html>